<div class="gist_based_auto_complete form_item_block">
    <%= label_tag 'lookup_command', 'Lookup Commands' -%>
    <%= text_field_tag nil, nil, :placeholder => 'Enter command name or keyword', :class => "lookup_command" -%>
    <div class="contextual_help has_go_tip_right" title="Lookup sample command snippets from your local <a class='' href='<%= docs_url '/advanced_usage/command_repository.html' %>' target='_blank'>command repository</a>."></div>
    <div class="error-message-for-old-args hidden">The lookup feature is only available for the <a class='' href='<%= docs_url '/advanced_usage/command_repository.html#args-style-commands' %>' target='_blank'>new style</a> of custom commands.</div>
</div>
<div class="snippet_details hidden">
    <div class="name">
        <span class="value"></span>
    </div>

    <div class="description">
        <span class="key">Description</span>
        <span class="value"></span>
    </div>

    <div>
        <div class="author">
            <span class="key">author:</span>
            <span class="value"></span>
            <span class="value-with-link"><a target="_blank"></a></span>
        </div>
        <div class="more-info">
            <span class="value-with-link"><a target="_blank">more info</a></span>
        </div>
    </div>
</div>
<% unless @invalid_commands.empty? -%>
    <div class="invalid_snippets">
        <div class="warnings">
            <span><%= @invalid_commands.size.to_s %> invalid commands found. <a href="#" class="show_snippets">Details</a></span>
        </div>

        <div class="snippets hidden">
            <h5>Invalid Commands</h5>
            <ul>
                <% @invalid_commands.each do |invalid_command_snippet| -%>
                <li>
                    <span class="command_name"><%= invalid_command_snippet.getBaseFileName() %></span>
                    <span class="message"><%= invalid_command_snippet.getErrorMessage() %></span>
                </li>
                <% end -%>
            </ul>
        </div>
    </div>
<% end -%>
<%= render :partial => 'shared/convert_tool_tips.html', :locals => {:scope => {}} %>
<script type="text/javascript">
    Util.on_load(function() {
        jQuery(".show_snippets").click(function() {
            jQuery(this).parents(".gist_panel").find(".snippets").toggleClass("hidden");
            return false;
        });
    })
</script>
